package cn.ecnu.feign;

import cn.ecnu.entity.Car;
import cn.ecnu.entity.Employee;
import cn.ecnu.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient("logistics-management")
public interface ManagementFeignService {

    @GetMapping("/employee/courier/location/{location}")
    R getEmployeeByLocation(@PathVariable String location);

    @PostMapping("/employee/update")
    R updateEmployee(@RequestBody Employee employee);

    @GetMapping("/employee/{id}")
    R getEmployeeById(@PathVariable("id") String id);

    @GetMapping("/employee/transmission/location/{location}")
    R getTransmissionByLocation(@PathVariable String location);

    @PostMapping("/car/update")
    R updateCar(@RequestBody Car car);

    @GetMapping("/car/{id}")
    R getCarById(@PathVariable("id") String id);

    @GetMapping("/address/{id}")
    R getAddressById(@PathVariable("id") Integer id);

    @GetMapping("/car/location/{location}")
    R getCarByLocation(@PathVariable String location);


}
